package task09;

import java.util.Scanner;

/**
 * @author Administrator
 */
public class Task3 {
    public static void main(String[] args) {
        int i=100;
        while(i<=999){
         /*  1 先把三位数i,拆分成百位a 十位ｂ　个位ｃ
           ２　判断　ｉ==a*a*a+b*b*b+c*c*c
           * true:yes
           *  false no */
           int a=i/100;
           int b=(i/10)%10;
           int c=i%10;
         if(i==a*a*a+b*b*b+c*c*c){
           System.out.println(i+"是水仙花数");
         }
         i++;
        }
    }
}
